﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Journeo_backend.Models.Domain
{
    [Table("regions")]
    public class Region
    {
        [Key]
        public long RegionId { get; set; }

        public long? ParentId { get; set; }

        public string? ExternalUrl { get; set; }

        [Required]
        [MaxLength(100)]
        public string RegionName { get; set; }

        [Required]
        public string RegionLevel { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.Now;

        [ForeignKey("ParentId")]
        public Region? ParentRegion { get; set; }
    }
}
